// CLumpData.cpp
//

#include "StdAfx.h"
#include "LumpData.h"
#include <string.h>

LumpData::LumpData(){	
	memset( real_buf_, 0, DEF_DEFAULT_SIZE );
	buf_ = real_buf_;		
	current_ = buf_; 
	data_size_ = 0;	
}

LumpData::LumpData( LumpData& data ){
	memcpy( real_buf_, data.real_buf_, DEF_DEFAULT_SIZE );
	buf_ = data.buf_;
	current_ = data.current_;
	mark_ = data.mark_;
	data_size_ = data.data_size_; 	
}

LumpData::LumpData( byte* data, unsigned int size){	
	IS_NULL_ACTION( data, return );
	IS_NULL_ACTION( size, return );
	
	memcpy( real_buf_, data, size );	
	
	buf_ = real_buf_;
	current_ = buf_;	
	data_size_ = size;
}

LumpData::~LumpData(){	
}
